g13ahf
g13ahf
© Numerical Algorithms Group, 2002.
Purpose
G13AHF Univariate time series, forecasting from state set
Synopsis
[fva,fsd,ifail] = g13ahf(st,mr,par,c,rms,nfv<,ifail>)
Description
The original time series is x , for t=1,2,...,n and parameters
t
have been fitted to the model of this time series using G13AFF.
Forecasts of x , for t=n+1,n+2,...,n+L, are calculated in five
t
stages, as follows:
(i) set a =0 for t=N+1,N+2,...,N+L, where N=n-d-(D*s) is the
t
number of differenced values in the series,
(ii) calculate the values of e for t=N+1,N+2,...,N+L, where
t
e =(phi) *e +...+(phi) *e +a -(theta) *a -...
t 1 t-1 p t-p t 1 t-1
-(theta) *a ,
q t-q
(iii) calculate the values of w for t=N+1,N+2,...,N+L, where
t
w =(Phi) *w +...+(Phi) *w +e -(Theta) *e -...
t 1 t-s P t-s*P t 1 t-s
-(Theta) *e ,
Q t-s*Q
where w for t<=N are the first s*P values in the state
t
set, corrected for the constant,
(iv) add the constant term c to give the differenced series
d D
(nabla) (nabla) x =w +c for t=N+1,N+2,...,N+L,
s t t
(v) the differencing operations are reversed to reconstitute x
t
for t=n+1,n+2,...n+L.
The standard errors of these forecasts are given by
2 2 2 1/2
s ={V*((psi) +(psi) +...+(psi) )} for t=n+1,n+2,...,n+L,
t 0 1 t-n-1
where (psi) =1, V is the residual variance of a and (psi) is
0 t j
the coefficient expressing the dependence of x on a .
t t-j
To calculate (psi) for j=1,2,...,(L-1) the following device is
j
used.
A copy of the state set is initialised to zero throughout and the
calculations outlined above for the construction of forecasts are
carried out with the settings a =1, and a =0 for
N+1 t
t=N+2,N+3,...,N+L.
The resulting quantities corresponding to the sequence
x ,x ,...,x are precisely 1, (psi) ,(psi) ,...,(psi) .
N+1 N+2 N+L 1 2 L-1
The supplied time series model is used throughout these
calculations, with the exception that the constant term c is
taken to be zero.
Parameters
g13ahf
Required Input Arguments:
st (:) real
mr (7) integer
par (:) real
c real
rms real
nfv integer
Optional Input Arguments: <Default>
ifail integer -1
Output Arguments:
fva (nfv) real
fsd (nfv) real
ifail integer